package com.dragon.modules.yuegou.query.live;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.live.ReviewSpuEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;

/**
 * 商品送审表 动态查询条件
 * 
 * @author ZSH
 * @date 2020-06-12 09:57:51
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class ReviewSpuQuery extends ReviewSpuEntity implements Query<ReviewSpuEntity> {



    /** Id查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商圈Id查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** spuId查询条件 */
	@JsonUnwrapped(prefix = "spuId")
	private Condition<String> spuIdCondition;

    /** 微信商品Id查询条件 */
	@JsonUnwrapped(prefix = "goodsId")
	private Condition<String> goodsIdCondition;

    /** 微信商品审核Id查询条件 */
	@JsonUnwrapped(prefix = "auditId")
	private Condition<String> auditIdCondition;

    /** 商品状态: 0：未审核。1：审核中，2：审核通过，3：审核驳回查询条件 */
	@JsonUnwrapped(prefix = "status")
	private Condition<String> statusCondition;

    /** 商品名称查询条件 */
	@JsonUnwrapped(prefix = "name")
	private Condition<String> nameCondition;

    /** 商品图片查询条件 */
	@JsonUnwrapped(prefix = "coverImgUrl")
	private Condition<String> coverImgUrlCondition;

    /** 商品图片 微信mediaID查询条件 */
	@JsonUnwrapped(prefix = "coverImgUrlMedia")
	private Condition<String> coverImgUrlMediaCondition;

    /** 价格类型: 1：一口价，2：价格区间，3：显示折扣价查询条件 */
	@JsonUnwrapped(prefix = "priceType")
	private Condition<String> priceTypeCondition;

    /** 价格 一口价 or 价格左边界 or 原价查询条件 */
	@JsonUnwrapped(prefix = "price")
	private Condition<BigDecimal> priceCondition;

    /** 价格 价格右边界 or 折扣价查询条件 */
	@JsonUnwrapped(prefix = "price2")
	private Condition<BigDecimal> price2Condition;

    /** 商品详情页的小程序路径查询条件 */
	@JsonUnwrapped(prefix = "url")
	private Condition<String> urlCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public ReviewSpuQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public ReviewSpuQuery(ReviewSpuEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public ReviewSpuQuery(ReviewSpuQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.spuIdCondition != null) {
			this.spuIdCondition = other.spuIdCondition.copy();
		}
		if(other.goodsIdCondition != null) {
			this.goodsIdCondition = other.goodsIdCondition.copy();
		}
		if(other.auditIdCondition != null) {
			this.auditIdCondition = other.auditIdCondition.copy();
		}
		if(other.statusCondition != null) {
			this.statusCondition = other.statusCondition.copy();
		}
		if(other.nameCondition != null) {
			this.nameCondition = other.nameCondition.copy();
		}
		if(other.coverImgUrlCondition != null) {
			this.coverImgUrlCondition = other.coverImgUrlCondition.copy();
		}
		if(other.coverImgUrlMediaCondition != null) {
			this.coverImgUrlMediaCondition = other.coverImgUrlMediaCondition.copy();
		}
		if(other.priceTypeCondition != null) {
			this.priceTypeCondition = other.priceTypeCondition.copy();
		}
		if(other.priceCondition != null) {
			this.priceCondition = other.priceCondition.copy();
		}
		if(other.price2Condition != null) {
			this.price2Condition = other.price2Condition.copy();
		}
		if(other.urlCondition != null) {
			this.urlCondition = other.urlCondition.copy();
		}
	}

	@Override
	public QueryWrapper<ReviewSpuEntity> toQueryWrapper() {
		QueryWrapper<ReviewSpuEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (spuIdCondition != null) {
			spuIdCondition.toWrapper(wrapper, COL_SPU_ID);
		}
		if (goodsIdCondition != null) {
			goodsIdCondition.toWrapper(wrapper, COL_GOODS_ID);
		}
		if (auditIdCondition != null) {
			auditIdCondition.toWrapper(wrapper, COL_AUDIT_ID);
		}
		if (statusCondition != null) {
			statusCondition.toWrapper(wrapper, COL_STATUS);
		}
		if (nameCondition != null) {
			nameCondition.toWrapper(wrapper, COL_NAME);
		}
		if (coverImgUrlCondition != null) {
			coverImgUrlCondition.toWrapper(wrapper, COL_COVER_IMG_URL);
		}
		if (coverImgUrlMediaCondition != null) {
			coverImgUrlMediaCondition.toWrapper(wrapper, COL_COVER_IMG_URL_MEDIA);
		}
		if (priceTypeCondition != null) {
			priceTypeCondition.toWrapper(wrapper, COL_PRICE_TYPE);
		}
		if (priceCondition != null) {
			priceCondition.toWrapper(wrapper, COL_PRICE);
		}
		if (price2Condition != null) {
			price2Condition.toWrapper(wrapper, COL_PRICE2);
		}
		if (urlCondition != null) {
			urlCondition.toWrapper(wrapper, COL_URL);
		}
		return wrapper;
	}

	/**
	 * 构造并返回Id查询条件
	 * 
	 * @return idCondition Id查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取Id查询条件
	 * 
	 * @return idCondition Id查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置Id查询条件
	 * 
	 * @param idCondition Id查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商圈Id查询条件
	 * 
	 * @return busdIdCondition 商圈Id查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取商圈Id查询条件
	 * 
	 * @return busdIdCondition 商圈Id查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈Id查询条件
	 * 
	 * @param busdIdCondition 商圈Id查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回spuId查询条件
	 * 
	 * @return spuIdCondition spuId查询条件
	 */
	public Condition<String> spuId() {
		this.spuIdCondition = new Condition<>();
		return this.spuIdCondition;
	}
	
	/**
	 * 获取spuId查询条件
	 * 
	 * @return spuIdCondition spuId查询条件
	 */
	public Condition<String> getSpuIdCondition() {
		return spuIdCondition;
	}

	/**
	 * 设置spuId查询条件
	 * 
	 * @param spuIdCondition spuId查询条件
	 */
	public void setSpuIdCondition(Condition<String> spuIdCondition) {
		this.spuIdCondition = spuIdCondition;
	}

	/**
	 * 构造并返回微信商品Id查询条件
	 * 
	 * @return goodsIdCondition 微信商品Id查询条件
	 */
	public Condition<String> goodsId() {
		this.goodsIdCondition = new Condition<>();
		return this.goodsIdCondition;
	}
	
	/**
	 * 获取微信商品Id查询条件
	 * 
	 * @return goodsIdCondition 微信商品Id查询条件
	 */
	public Condition<String> getGoodsIdCondition() {
		return goodsIdCondition;
	}

	/**
	 * 设置微信商品Id查询条件
	 * 
	 * @param goodsIdCondition 微信商品Id查询条件
	 */
	public void setGoodsIdCondition(Condition<String> goodsIdCondition) {
		this.goodsIdCondition = goodsIdCondition;
	}

	/**
	 * 构造并返回微信商品审核Id查询条件
	 * 
	 * @return auditIdCondition 微信商品审核Id查询条件
	 */
	public Condition<String> auditId() {
		this.auditIdCondition = new Condition<>();
		return this.auditIdCondition;
	}
	
	/**
	 * 获取微信商品审核Id查询条件
	 * 
	 * @return auditIdCondition 微信商品审核Id查询条件
	 */
	public Condition<String> getAuditIdCondition() {
		return auditIdCondition;
	}

	/**
	 * 设置微信商品审核Id查询条件
	 * 
	 * @param auditIdCondition 微信商品审核Id查询条件
	 */
	public void setAuditIdCondition(Condition<String> auditIdCondition) {
		this.auditIdCondition = auditIdCondition;
	}

	/**
	 * 构造并返回商品状态: 0：未审核。1：审核中，2：审核通过，3：审核驳回查询条件
	 * 
	 * @return statusCondition 商品状态: 0：未审核。1：审核中，2：审核通过，3：审核驳回查询条件
	 */
	public Condition<String> status() {
		this.statusCondition = new Condition<>();
		return this.statusCondition;
	}
	
	/**
	 * 获取商品状态: 0：未审核。1：审核中，2：审核通过，3：审核驳回查询条件
	 * 
	 * @return statusCondition 商品状态: 0：未审核。1：审核中，2：审核通过，3：审核驳回查询条件
	 */
	public Condition<String> getStatusCondition() {
		return statusCondition;
	}

	/**
	 * 设置商品状态: 0：未审核。1：审核中，2：审核通过，3：审核驳回查询条件
	 * 
	 * @param statusCondition 商品状态: 0：未审核。1：审核中，2：审核通过，3：审核驳回查询条件
	 */
	public void setStatusCondition(Condition<String> statusCondition) {
		this.statusCondition = statusCondition;
	}

	/**
	 * 构造并返回商品名称查询条件
	 * 
	 * @return nameCondition 商品名称查询条件
	 */
	public Condition<String> name() {
		this.nameCondition = new Condition<>();
		return this.nameCondition;
	}
	
	/**
	 * 获取商品名称查询条件
	 * 
	 * @return nameCondition 商品名称查询条件
	 */
	public Condition<String> getNameCondition() {
		return nameCondition;
	}

	/**
	 * 设置商品名称查询条件
	 * 
	 * @param nameCondition 商品名称查询条件
	 */
	public void setNameCondition(Condition<String> nameCondition) {
		this.nameCondition = nameCondition;
	}

	/**
	 * 构造并返回商品图片查询条件
	 * 
	 * @return coverImgUrlCondition 商品图片查询条件
	 */
	public Condition<String> coverImgUrl() {
		this.coverImgUrlCondition = new Condition<>();
		return this.coverImgUrlCondition;
	}
	
	/**
	 * 获取商品图片查询条件
	 * 
	 * @return coverImgUrlCondition 商品图片查询条件
	 */
	public Condition<String> getCoverImgUrlCondition() {
		return coverImgUrlCondition;
	}

	/**
	 * 设置商品图片查询条件
	 * 
	 * @param coverImgUrlCondition 商品图片查询条件
	 */
	public void setCoverImgUrlCondition(Condition<String> coverImgUrlCondition) {
		this.coverImgUrlCondition = coverImgUrlCondition;
	}

	/**
	 * 构造并返回商品图片 微信mediaID查询条件
	 * 
	 * @return coverImgUrlMediaCondition 商品图片 微信mediaID查询条件
	 */
	public Condition<String> coverImgUrlMedia() {
		this.coverImgUrlMediaCondition = new Condition<>();
		return this.coverImgUrlMediaCondition;
	}
	
	/**
	 * 获取商品图片 微信mediaID查询条件
	 * 
	 * @return coverImgUrlMediaCondition 商品图片 微信mediaID查询条件
	 */
	public Condition<String> getCoverImgUrlMediaCondition() {
		return coverImgUrlMediaCondition;
	}

	/**
	 * 设置商品图片 微信mediaID查询条件
	 * 
	 * @param coverImgUrlMediaCondition 商品图片 微信mediaID查询条件
	 */
	public void setCoverImgUrlMediaCondition(Condition<String> coverImgUrlMediaCondition) {
		this.coverImgUrlMediaCondition = coverImgUrlMediaCondition;
	}

	/**
	 * 构造并返回价格类型: 1：一口价，2：价格区间，3：显示折扣价查询条件
	 * 
	 * @return priceTypeCondition 价格类型: 1：一口价，2：价格区间，3：显示折扣价查询条件
	 */
	public Condition<String> priceType() {
		this.priceTypeCondition = new Condition<>();
		return this.priceTypeCondition;
	}
	
	/**
	 * 获取价格类型: 1：一口价，2：价格区间，3：显示折扣价查询条件
	 * 
	 * @return priceTypeCondition 价格类型: 1：一口价，2：价格区间，3：显示折扣价查询条件
	 */
	public Condition<String> getPriceTypeCondition() {
		return priceTypeCondition;
	}

	/**
	 * 设置价格类型: 1：一口价，2：价格区间，3：显示折扣价查询条件
	 * 
	 * @param priceTypeCondition 价格类型: 1：一口价，2：价格区间，3：显示折扣价查询条件
	 */
	public void setPriceTypeCondition(Condition<String> priceTypeCondition) {
		this.priceTypeCondition = priceTypeCondition;
	}

	/**
	 * 构造并返回价格 一口价 or 价格左边界 or 原价查询条件
	 * 
	 * @return priceCondition 价格 一口价 or 价格左边界 or 原价查询条件
	 */
	public Condition<BigDecimal> price() {
		this.priceCondition = new Condition<>();
		return this.priceCondition;
	}
	
	/**
	 * 获取价格 一口价 or 价格左边界 or 原价查询条件
	 * 
	 * @return priceCondition 价格 一口价 or 价格左边界 or 原价查询条件
	 */
	public Condition<BigDecimal> getPriceCondition() {
		return priceCondition;
	}

	/**
	 * 设置价格 一口价 or 价格左边界 or 原价查询条件
	 * 
	 * @param priceCondition 价格 一口价 or 价格左边界 or 原价查询条件
	 */
	public void setPriceCondition(Condition<BigDecimal> priceCondition) {
		this.priceCondition = priceCondition;
	}

	/**
	 * 构造并返回价格 价格右边界 or 折扣价查询条件
	 * 
	 * @return price2Condition 价格 价格右边界 or 折扣价查询条件
	 */
	public Condition<BigDecimal> price2() {
		this.price2Condition = new Condition<>();
		return this.price2Condition;
	}
	
	/**
	 * 获取价格 价格右边界 or 折扣价查询条件
	 * 
	 * @return price2Condition 价格 价格右边界 or 折扣价查询条件
	 */
	public Condition<BigDecimal> getPrice2Condition() {
		return price2Condition;
	}

	/**
	 * 设置价格 价格右边界 or 折扣价查询条件
	 * 
	 * @param price2Condition 价格 价格右边界 or 折扣价查询条件
	 */
	public void setPrice2Condition(Condition<BigDecimal> price2Condition) {
		this.price2Condition = price2Condition;
	}

	/**
	 * 构造并返回商品详情页的小程序路径查询条件
	 * 
	 * @return urlCondition 商品详情页的小程序路径查询条件
	 */
	public Condition<String> url() {
		this.urlCondition = new Condition<>();
		return this.urlCondition;
	}
	
	/**
	 * 获取商品详情页的小程序路径查询条件
	 * 
	 * @return urlCondition 商品详情页的小程序路径查询条件
	 */
	public Condition<String> getUrlCondition() {
		return urlCondition;
	}

	/**
	 * 设置商品详情页的小程序路径查询条件
	 * 
	 * @param urlCondition 商品详情页的小程序路径查询条件
	 */
	public void setUrlCondition(Condition<String> urlCondition) {
		this.urlCondition = urlCondition;
	}

}
